﻿@{
    Layout = null;
    DeliveryManage.Models.ReturnMsgModel returnMsg = ViewBag.ReturnMsgModel;
}
@model DeliveryManage.Model.Pro_Orders
<!DOCTYPE html>
<html class="x-admin-sm">
<head>
    <meta charset="UTF-8">
    <title>创建订单</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,initial-scale=1.0,user-scalable=no" />
    <link rel="stylesheet" href="~/Content/font.css">
    <link rel="stylesheet" href="~/Content/framemain.css">
    <link rel="stylesheet" href="~/Content/pagination.css" />
    <script type="text/javascript" src="~/Content/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="~/Scripts/jquery-3.3.1.min.js"></script>
    <script type="text/javascript" src="~/Scripts/common.js"></script>
    <script type="text/javascript" src="~/Scripts/framemain.js"></script>
    <script src="~/Scripts/jquery.unobtrusive-ajax.js"></script>
    <style>
        .layui-table img {
            max-width: inherit;
        }

        .pro-img {
            border-radius: 5px;
            border: 1px solid #f2f2f2;
        }

        .layui-layer-molv .layui-layer-btn .layui-layer-btn1 {
            background: #fff !important;
            border: 1px solid #dedede;
        }

        .txt-number {
            width: 50px;
            float: left;
        }

        .btn-number {
            width: 40px;
            float: left;
        }

        .txt-col {
            color: red !important;
        }
    </style>
    <script type="text/javascript">
     $(function () {
         //操作提示
         if(@returnMsg.code== 400){
             layer.alert('@returnMsg.msg', { icon: 5, title: '提示' }, function (index) {
             })
         }
         $(document).ready(function () {
             $("#myfrom").submit(function () {
                 var data = $(this).serialize();
                 layer.confirm('确认提交吗?', { icon: 3, title: '提示' }, function (index) {
                     $.ajax({
                         type: "POST",
                         url: "/Order/UpdateOrderStatus",
                         data: data,
                         success: function (obj) {
                             if (obj.status == true) {
                                 layer.msg(obj.msg, { icon: 6, title: '提示' }, function (index) {
                                     window.parent.window.location.href = '/Order/AuditOrderList';
                                 });
                             } else {
                                 layer.confirm(obj.msg, { icon: 5, title: '提示' }, function (index) {
                                     layer.close();
                                     location.reload();
                                 });
                             }
                         }
                     })
                     layer.close();
                 });
                 return false;

             })
         })
     });
    </script>
</head>
<body>
    <form id="myfrom" class="tab-content layui-form" action="" lay-filter="example">
        @{
            @Html.HiddenFor(m => m.Id)
            @Html.Hidden("AddOrEdit", (string)ViewBag.AddOrEdit)
            <div class="x-nav">
                <span class="layui-breadcrumb">
                    <a href="javascript:;">首页</a>
                    <a><cite>已审核订单</cite></a>
                    <a><cite>修改订单状态</cite></a>
                </span>
            </div>
            if (returnMsg.code == 200)
            {
                <div class="layui-fluid">
                    <div class="layui-row layui-col-space15">
                        <div class="layui-col-md12">
                            <div class="layui-card">
                                <div class="layui-card-body ">
                                    <blockquote class="layui-elem-quote">订单信息</blockquote>
                                    <div class="layui-form-item">
                                        <label class="layui-form-label">订单状态</label>
                                        <div class="layui-input-block">
                                            @Html.DropDownListFor(m => m.Status, ViewData["StatusList"] as SelectList, new { @class = "layui-input layui-select", id = "Status", @lay_filter = "Status" })
                                        </div>
                                    </div>
                                    <div class="layui-form-item layui-form-text">
                                        <label class="layui-form-label">订单备注</label>
                                        <div class="layui-input-block">
                                            @Html.TextAreaFor(m => m.Remark, new { @datatype = "s1-128", @autocomplete = "off", @class = "layui-textarea", @sucmsg = " ", id = "Remark", placeholder = "订单备注...(选填)" })
                                        </div>
                                    </div>

                                    <div class="layui-form-item">
                                        <label class="layui-form-label">
                                            <span class="x-red"></span>
                                        </label>
                                        <div class="layui-input-inline">
                                            <input id="btnSubmit" name="btnSubmit" type="submit" value="&#xe605; 确认更新" class="layui-btn layui-icon" />
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

            }
        }
    </form>

    <script type="text/javascript">
        layui.use(['laydate', 'form'], function () {
            var laydate = layui.laydate;
            var form = layui.form;

        });
    </script>
</body>
</html>
